package com.ssy.lingxi.order.model.vo.basic.request;

import com.ssy.lingxi.order.handler.annotation.DateTimeFormatAnnotation;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 订单优惠券使用记录
 * @author 万宁
 * @version 2.0.0
 * @date 2021-09-23
 */
@Setter
@Getter
public class DeliveryOrderProductParamVO implements Serializable {

    private static final long serialVersionUID = -7912008527158884778L;
    /**
     * 订单商品id
     */
    @NotNull(message = "订单商品id不能为空")
    private Long orderProductId;
    /**
     * 商品skuId/物料id
     */
    @Size(max = 16,message = "商品skuId/物料id最长16个字符！")
    private String skuId;

    /**
     * 商品名称/物料名称
     */
    @Size(max = 255,message = "商品名称/物料名称最长255个字符！")
    private String productName;

    /**
     * 规格型号
     */
    @Size(max = 40,message = "规格型号最长40个字符！")
    private String spec;

    /**
     * 品类
     */
    @Size(max = 16,message = "品类最长16个字符！")
    private String category;

    /**
     * 品牌
     */
    @Size(max = 20,message = "品牌最长20个字符！")
    private String brand;

    /**
     * 单位
     */
    @Size(max = 16,message = "单位最长16个字符！")
    private String unit;

    /**
     * 订单编号
     */
    @NotNull(message = "订单编号不能为空")
    @Size(max = 16,message = "订单编号最长16个字符！")
    private String orderNo;

    /**
     * 下单时间 yyyy-MM-dd HH:mm:ss
     */
    @DateTimeFormatAnnotation(nullable = true,message = "下单时间格式错误！")
    private String createTime;

    /**
     * 采购数量
     */
    private BigDecimal purchaseCount;

    /**
     * 送货数量
     */
    @NotNull(message = "送货数量不能为空")
    private BigDecimal deliveryCount;

}
